import http from './interface'

/**
 * 将业务所有接口统一起来便于维护
 * 如果项目很大可以将 url 独立成文件，接口分成不同的模块
 *
 */

// 获取openid
const getOpenId = (params) => {
	return http.post("/mp/openid", params)
}

// 获取精灵分页数据
const getInitData = (params) => {
	return http.get("/elf/query", params)
}

const getMonsterQuery = (params) => {
	return http.get("/monster/query", params)
}

// 获取精灵详情信息
const getDetailData = (params) => {
	return http.get("/elf/detail", params)
}

// 获取精灵的捕捉信息
const getCaptureDetail = (params) => {
	return http.get("/elf/capture", params)
}

// 获取精灵皮肤信息
const getSeerSkin = (params) => {
	return http.get("/elf_skin/list", params)
}

// 获取刻印分页数据
const getCounterMarkQuery = (params) => {
	return http.get("/counter_mark/query", params)
}

// 获取刻印系列列表
const getMintmarkList = (params) => {
	return http.get("/mintmark_class/list", params)
}

// 获取套装分页数据
const getSuitQuery = (params) => {
	return http.get("/suit/query", params)
}

// 获取性格列表
const getCharacterList = (params) => {
	return http.get("/character/list", params)
}

// 获取异常状态分页数据
const getAbnormalStatusQuery = (params) => {
	return http.get("/abnormal_status/query", params)
}

// 获取所有属性
const getRestrainList = (params) => {
	return http.get("/restrain/list", params)
}

// 获取技能列表
const getSkillsList = (params) => {
	return http.get("/skills/list", params)
}

// 获取技能列表
const getSkillsQuery = (params) => {
	return http.get("/skills/query", params)
}

// 获取魂印列表
const getEffectIconList = (params) => {
	return http.get("/effect_icon/list", params)
}

// 获取配置列表
const getGlobalConfigList = (params) => {
	return http.get("/global_config/list", params)
}

// 获取更新通知列表
const getUpdateNoticeList = (params) => {
	return http.get("/update_notice/list", params)
}

// 获取成就分页
const getAchievementQuery = (params) => {
	return http.get("/achievement/query", params)
}

// 获取公众号文章
const getPublicAccountArticleQuery = (params) => {
	return http.get("/public_article/query", params)
}

// 刷新公众号文章
const refreshPublicAccountArticle = (params) => {
	return http.get("/public_article/save", params)
}

// 获取散件列表
const getSparePartsList = (params) => {
	return http.get("/spare_parts/list", params)
}

// 获取礼物列表
const getGiftList = (params) => {
	return http.get("/gift/list", params)
}

// 修改礼物状态
const updateGiftStatus = (params) => {
	return http.post("/gift/update_status", params)
}

// 保存收藏
const saveCollect = (params) => {
	return http.post("/my_collect/save", params)
}

// 章节列表
const getAdventureChapter = (params) => {
	return http.get("/adventure_chapter/list", params)
}

// 对话列表
const getAdventureStoryDialog = (params) => {
	return http.get("/adventure_story_dialog/list", params)
}

// 菜单列表
const getMpMenu = (params) => {
	return http.get("/mp_menu/list", params)
}

// 永夜莱达分类
const getArchivesStoryClass = (params) => {
	return http.get("/archives_class/list", params)
}

// 永夜莱达
const getArchivesStory = (params) => {
	return http.get("/archives_story/query", params)
}

// 默认全部导出  import api from '@/common/vmeitime-http/'
export default {
	getInitData,
	getMonsterQuery,
	getDetailData,
	getCaptureDetail,
	getSeerSkin,
	getCounterMarkQuery,
	getMintmarkList,
	getSuitQuery,
	getCharacterList,
	getAbnormalStatusQuery,
	getRestrainList,
	getSkillsList,
	getEffectIconList,
	getGlobalConfigList,
	getUpdateNoticeList,
	getAchievementQuery,
	getPublicAccountArticleQuery,
	getSparePartsList,
	refreshPublicAccountArticle,
	getGiftList,
	updateGiftStatus,
	getOpenId,
	saveCollect,
	getAdventureChapter,
	getAdventureStoryDialog,
	getMpMenu,
	getSkillsQuery,
	getArchivesStory,
	getArchivesStoryClass
}
